package com.yan.community.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.yan.club.result.Result;
import com.yan.community.model.ClubCommunityDept;
import com.yan.community.service.ClubCommunityDeptService;

/**
 * @author 彦
 * @since 2024/1/15 16:01
 */
@RestController
@RequestMapping("/community/dept")
public class CommunityDeptController {

    @Resource
    private ClubCommunityDeptService clubCommunityDeptService;

    /**
     * 根据id得到社团的种类
     *
     * @param communityId
     * @return
     */
    @GetMapping("/getCommunityDeptById")
    public Result<List<ClubCommunityDept>> getCommunityDeptById(@RequestParam Long communityId) {
        return clubCommunityDeptService.getCommunityDeptById(communityId);
    }
}
